/****    LED sequences    ***************************************************************************
In standalone mode, these preprogrammed sequences will be stepped through with consecutive 
presses of switch 1.  In I2C mode, sequence numbers are specified by I2C Mode logic, based 
on MultiWii parameters passed from the FCB.
*****************************************************************************************************/

void LED_sequence(uint8_t LED_seq) {
  if (LED_seq==0) {  // ***** Alternate static red
    set_odd_rgb(0,0,0);
    set_even_rgb(255,0,0);
  }
  if (LED_seq==1) // ***** Static red
    set_all_rgb(255,0,0);
  if (LED_seq==2) // ***** Static green
    set_all_rgb(0,255,0);
  if (LED_seq==3) // ***** Static blue
    set_all_rgb(0,0,255);
  if (LED_seq==4) // ***** Static majenta
    set_all_rgb(255,0,255);
  if (LED_seq==5) // ***** Add yellow even LEDs
    set_even_rgb(255,255,0);
  if (LED_seq==6) {  // ***** Light up green right and red left quarters
    set_front_rgb(0,0,0);
    set_rear_rgb(0,0,0);
    set_right_rgb(0,255,0);
    set_left_rgb(255,0,0);
  }
  if (LED_seq==7) {  // ***** Add yellow front and white rear quarters
    set_front_rgb(255,255,0);
    set_rear_rgb(255,255,255);
  }
  if (LED_seq==8) // ***** rgb gradient layout
    LED_layout(2);
  if (LED_seq==9) // ***** rotate pre-defined sequence
    rotate(2,50);
  if (LED_seq==10) // ***** Slow flashing green
    ringFlasher(0,255,0,150,300);
  if (LED_seq==11) // ***** Fast flashing red   
    ringFlasher(255,0,0,100,200);
  if (LED_seq==12) // ***** Even/odd alternating flash green/blue
    altFlasher(1,2,150,250);
  if (LED_seq==13) { // ***** Double flash white
    for (led=0;led<10;led=led+3)
      set_led_rgb(led,0,255,0);
    for (led=1;led<11;led=led+3) {
      dblFlasher(led,255,255,255,200,400);
      dblFlasher(led+1,255,255,255,200,400);
    }
  }
  if (LED_seq==14) // ***** RGB w/ white strobe 
    for (led=0;led<12;led=led+2) {
      set_led_rgb(led,0,0,0);      
      rgbStrobe(led+1,255,0,0,100,1000);
    }
  if (LED_seq==15) // ***** MWC navi static
    LED_layout(1);
  if (LED_seq==16) // ***** MWC navi strobing
    navStrobe(1,100,350); 
  if (LED_seq==17) // ***** Chaser red CW
   chaser(0,255,2,75);
  if (LED_seq==18) // ***** Fast chaser green CCW
    chaser(1,255,1,25);
  if (LED_seq==19) // ***** Red on white circle CW
    circle(255,0,0,2,75); 
  if (LED_seq==20) // ***** White on blue circle CCW
    circle2(0,0,255,1,125);  
  if (LED_seq==21) { // ***** advance red CW
    set_all_rgb(255,255,255);
    set_led_rgb(0,255,0,0);
    advance(2,200);
  }
  if (LED_seq==22) // ***** alternating red/white advance 
    altAdvance(255,0,0,255,255,255,60);
  if (LED_seq==23) { // ***** bounce red
    set_all_rgb(175,175,175);
    bounce(255,0,0,0,100);
  }
  if (LED_seq==24) { // ***** sweep blue
    set_odd_rgb(175,175,175);
    set_even_rgb(200,200,0);
    sweep(0,0,255,start,75);
  }
  if (LED_seq==25) { // ***** sweep fast red
    set_all_rgb(255,255,255);
    sweep(255,0,0,0,25);
  }  
  if (LED_seq==26) // **** Red rollers
    rollers(255,0,0,2,50);
  if (LED_seq==27) // **** Blue rollers
     rollers(0,0,255,1,50);
  if (LED_seq==28) { // **** Sh*t!. What? Rollers. No!. Yep. Sh*t!
    rollers(255,0,0,2,25);
    wait(25);
    rollers(0,0,255,2,25);
  }
  if (LED_seq==29) // ***** breathing white
    breather(255,255,255,5);
  if (LED_seq==30) { // ***** gradient between rgb inputs
    gradient(255,0,0,0,0,255,3);
    rotate(2,25);
  }
  if (LED_seq==31) { // ***** morph back and forth between rgb inputs 
    morph(255,0,0,0,0,255,20);
    morph(0,0,255,255,0,0,20);
  }
}

